1. Field of the Invention
The present invention relates to layer 2 (and above) switching of data packets in a non-blocking network switch configured for switching data packets between subnetworks and more particularly to optimizing evaluation of a received data packet for switching.
2. Background Art
Local area networks use a network cable or other media to link stations on the network. Each local area network architecture uses a media access control (MAC) enabling network interface devices at each network node to access the network medium.
The Ethernet protocol IEEE 802.3 has evolved to specify a half-duplex media access mechanism and a full-duplex media access mechanism for transmission of data packets. The full-duplex media access mechanism provides a two-way, point-to-point communication link between two network elements, for example between a network node and a switched hub.
Switched local area networks are encountering increasing demands for higher speed connectivity, more flexible switching performance, and the ability to accommodate more complex network architectures. For example, commonly-assigned U.S. Pat. No. 5,953,335 discloses a network switch configured for switching layer 2 type Ethernet (IEEE 802.3) data packets between different network nodes; a received data packet may include a VLAN (virtual LAN) tagged frame according to IEEE 802.1q protocol that specifies another subnetwork (via a router) or a prescribed group of stations. Since the switching occurs at the layer 2 level, a router is typically necessary to transfer the data packet between subnetworks.
Efforts to enhance the switching performance of a network switch to include layer 3 (e.g., Internet protocol) processing may suffer serious drawbacks, as current layer 2 switches preferably are configured for operating in a non-blocking mode, where data packets can be output from the switch at the same rate that the data packets are received. Newer designs are needed to ensure that higher speed switches can provide both layer 2 and above switching capabilities for faster speed networks such as 100 Mbps or gigabit networks.
However, such design requirements risk loss of the non-blocking features of the network switch, as it becomes increasingly difficult for the switching fabric of a network switch to be able to perform layer 3 processing at the wire rates (i.e., the network data rate).
There is a need for an arrangement that enables a network switch to provide layer 2 switching and layer 3 switching capabilities for 100 Mbps and gigabit links without blocking of the data packets.
There is also a need for an arrangement that minimizes required memory space in a network switch port by optimizing the storage of min terms for evaluation of the most relevant data bytes of the received data packets.
There is also a need for an arrangement that minimizes the time required in the evaluation of received data packets by the respective ports of a network switch.
These and other needs are attained by the present invention, where a network switch includes a plurality of ports. Each port is configured to compare a corresponding incoming data packet with at least one template. Each template has min terms where each min term specifies a corresponding prescribed value that is to be compared with a corresponding selected byte of the incoming data packet. The network switch also includes a manager module configured to supply a next location field to each port based on a request from the corresponding port. The port determines the next corresponding selected byte of the incoming data packet from the next location field. The next corresponding selected byte is compared with a next corresponding prescribed value in response to a subsequent location field request from the port. As a result, a port may jump directly to the next relevant byte location after finishing a current evaluation of a current byte location in a received data packet, bypassing non-relevant bytes preceding the next relevant byte. Hence, the total time in evaluating a received data packet for switching can be minimized.
One aspect of the present invention provides for a network switch comprising a plurality of ports. Each port is configured to compare a corresponding incoming data packet with at least one template. Each template has min terms specifying a corresponding prescribed value that is to be compared with a corresponding selected byte of the incoming data packet by the port, the selected byte specified by a first location field. The network switch also includes a manager module configured for supplying the first location field and a first address in response to a first request from the corresponding port. The manager module supplies, in response to a second request including the first address from the corresponding port, a second location field specifying a second corresponding selected byte for comparison with a corresponding successive second of the min terms and a second address, the second address specifying a location for a subsequent min term comparison. As a result, a port may begin evaluation of the next relevant byte location after finishing a current evaluation of a current byte location in a received data packet, and thus, reducing the total time in evaluating entire received data packet for switching. Accordingly, a network switch may provide layer 2 switching and layer 3 switching capabilities for 100 Mbps and gigabit links without blocking of the data packets.
Another aspect of the present invention provides a method, in a network switch, of evaluating incoming data packets at a network switch port. The method includes comparing the incoming data packet with at least one template. Each template has min terms where each min term specifying a corresponding prescribed value for comparison by the network switch port with a corresponding selected byte of the incoming data byte, the selected byte specified by a location field. The method also includes requesting a next byte location to determine a next corresponding selected byte for a next comparison with a next corresponding prescribed value with a next location field request from the network switch port. The method further includes supplying the next byte location from a manager module in response to the next location field request from the network switch port.
Additional advantages and novel features of the invention will be set forth in part in the description which follows and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the present invention may be realized and attained by means of instrumentalities and combinations particularly pointed in the appended claims.